//
//  LZSTypeTableViewCell.m
//  IOSProject
//
//  Created by lzs on 2018/4/20.
//  Copyright © 2018年 com.linzhisheng. All rights reserved.
//

#import "LZSTypeTableViewCell.h"

@interface LZSTypeTableViewCell()
//@property (nonatomic, strong) UIImageView *iconView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *detailLabel;


@end

@implementation LZSTypeTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.titleLabel = [self setuplabelwithfont:[UIFont systemFontOfSize:15] withText:@"这是标题" withColor:[UIColor lightGrayColor] wihtAlignemt:NSTextAlignmentLeft];
        [self.contentView addSubview:self.titleLabel];
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView).mas_offset(10);
            make.left.equalTo(self.contentView).mas_offset(25);
            make.right.equalTo(self.contentView).mas_offset(-15);
        }];
        
        self.detailLabel = [self setuplabelwithfont:[UIFont systemFontOfSize:15] withText:@"这是标题内容" withColor:[UIColor lightGrayColor] wihtAlignemt:NSTextAlignmentLeft];
        [self.contentView addSubview:self.detailLabel];
        
        [self.detailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.titleLabel.mas_bottom).mas_offset(15);
            make.left.equalTo(self.contentView).mas_offset(25);
            make.right.equalTo(self.contentView).mas_offset(-15);
            make.bottom.equalTo(self.contentView.mas_bottom).mas_offset(-10);
        }];
    }
    return self;
}

-(void)setModel:(LZSTypeModel *)model{
    _model = model;
    
    self.titleLabel.text = model.lottery_name;
    self.detailLabel.text = model.remarks;
}

-(void)setClassModel:(LZSCaiPiaoClassModel *)classModel{
    _classModel = classModel;
    
    self.titleLabel.text = classModel.name;
    self.detailLabel.text = @"";
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
